package com.example.aigc_education.integration.processor.v1.sync;

import com.example.aigc_education.enums.LanguageType;
import com.example.aigc_education.enums.PlanStageType;
import com.example.aigc_education.enums.PlanTargetType;
import com.example.aigc_education.integration.emuns.CozeWorkflowTypeV2;
import com.example.aigc_education.integration.processor.v1.CozeSyncWFProcessor;
import com.example.aigc_education.integration.request.CozeRequest;
import com.example.aigc_education.integration.request.params.v1.CozeStudyPlanParam;
import com.example.aigc_education.integration.request.params.v2.CozeAiTeacherParam;
import com.example.aigc_education.integration.response.workflows.v1.CozeAiTeacherResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class CozeAiTeacherSyncWFProcessor extends CozeSyncWFProcessor<CozeAiTeacherParam> {


    @Override
    protected String workflowId() {
        return CozeWorkflowTypeV2.AI_TEACHER.getWorkflowId();
    }


    @Override
    protected boolean isParamValid(CozeRequest<CozeAiTeacherParam> request) {
        CozeAiTeacherParam parameters = request.getParameters();
        if (parameters == null) {
            log.error("参数为空");
            return false;
        }

        if (parameters.getName() == null || parameters.getName().isEmpty()) {
            log.error("姓名不能为空");
            return false;
        }

        if (parameters.getTopic() == null || parameters.getTopic().isEmpty()) {
            log.error("主题不能为空");
            return false;
        }

        if (parameters.getSubtopic() == null || parameters.getSubtopic().isEmpty()) {
            log.error("子主题不能为空");
            return false;
        }

        return true;
    }
}
